ARG CENTOS_VERSION
FROM centos:${CENTOS_VERSION}
LABEL maintainer="dc <sdoz@live.com>"

RUN groupadd -f www && useradd -g www www

ARG BT_SCRIPT
# install pkg
RUN yum install -y wget \
    && yum install -y ca-certificates \
    && yum install -y gd

# install BT
RUN set -eux \
    && wget -O install.sh ${BT_SCRIPT} \
    && echo y | sh install.sh

COPY bt.sh /

RUN chmod +x /bt.sh

CMD [ "/bt.sh" ]
